package cloud.authentication.server.authentication.config;

import lombok.extern.slf4j.Slf4j;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Slf4j
@Configuration
@EnableWebSecurity
public class WebServerSecurityConfig extends WebSecurityConfigurerAdapter {
	@Override
	protected void configure(HttpSecurity http) throws Exception {
	 log.debug("WebServerSecurityConfig HttpSecurity configure method");
		http.csrf().disable();
		http.authorizeRequests()
		.antMatchers("/actuator/**").permitAll()
		.anyRequest().authenticated();
	}
	
}
